Reading Beside the Lines: Indentation as a Proxy for Complexity Metrics

نویسندگان

  • Abram Hindle
  • Michael W. Godfrey
  • Richard C. Holt
چکیده

Maintainers face the daunting task of wading through a collection of both new and old revisions, trying to ferret out revisions which warrant personal inspection. One can rank revisions by size/lines of code (LOC), but often, due to the distribution of the size of changes, revisions will be of similar size. If we can’t rank revisions by LOC perhaps we can rank by Halstead’s and McCabe’s complexity metrics? However, these metrics are problematic when applied to code fragments (revisions) written in multiple languages: special parsers are required which may not support the language or dialect used; analysis tools may not understand code fragments. We propose using the statistical moments of indentation as a lightweight, language independent, revision/diff friendly metric which actually proxies classical complexity metrics. We have extensively evaluated our approach against the entire CVS histories of the 278 of the most popular and most active SourceForge projects. We found that our results are linearly correlated and rankcorrelated with traditional measures of complexity, suggesting that measuring indentation is a cheap and accurate proxy for code complexity of revisions. Thus ranking revisions by the standard deviation and summation of indentation will be very similar to ranking revisions by complexity.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Reading beside the lines: Using indentation to rank revisions by complexity

Maintainers often face the daunting task of wading through a collection of both new and old revisions, trying to ferret out those that warrant detailed inspection. Perhaps the most obvious way to rank revisions is by size in terms of lines of code (LOC); this technique has the advantage of being both simple and fast. However, it is well known that the vast majority of revisions are quite small,...

متن کامل

Evaluating the Correlation Between Pollination Ecosystem Service and Landscape Pattern metrics (Case Study: Qazvin Province)

Pollination is an ecological service with high economic values related to human and ecological wellbeing. This study aims to evaluate the correlation between landscape complexity and pollination service (bee) in Qazvin province at the landscape scale. Landscape pattern metrics (Number of Patches (NP), Patch Richness (PR), Edge Density (ED), and Shannon Index (H)), as a proxy of landscape comple...

متن کامل

بهینه‌سازی اجرا و پاسخ صفحات وب در فضای ابری با روش‌های پیش‌پردازش، مطالعه موردی سامانه‌های وارنیش و انجینکس

The response speed of Web pages is one of the necessities of information technology. In recent years, renowned companies such as Google and computer scientists focused on speeding up the web. Achievements such as Google Pagespeed, Nginx and varnish are the result of these researches. In Customer to Customer(C2C) business systems, such as chat systems, and in Business to Customer(B2C) systems, s...

متن کامل

Proxy Means Tests for Targeting Subsidies Scheme in Iran

In this paper I develop a Proxy Means Tests (PMT) model and examine several targeting lines based on 2008 household survey data to identify beneficiaries for a targeting subsidy scheme in Iran. Based on the findings of this study, setting a cut-off percentile of 40% is expected to provide compensation for almost 70 percent of the poorest households. This will result in the highest accuracy main...

متن کامل

The Effect of Reducing Lexical and Syntactic Complexity of Texts on Reading Comprehension

The present study investigated the effect of different types of text simplification (i.e., reducing the lexical and syntactic complexity of texts) on reading comprehension of English as a Foreign Language learners (EFL). Sixty female intermediate EFL learners from three intact classes in Tabarestan Language Institute in Tehran participated in the study. The intact classes were assigned to three...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008